#include<stdio.h>
#include<stdbool.h>

/*注释： 不会参与代码编译*/
/*所有业务只有主函数main*/

int main()
{   
    /*数据类型*/
    /*1.整型*/
    int money = 1000;
    /*内存：整型占4个字节*/
    int length = sizeof(int);
    printf("size of the length:%d\n",length);       /* %d: 十进制.decimal*/

    /*2. 字符类型*/
    char ch = 'A';
    /*内存：字符型占1个字节 = 8bits.*/
    length = sizeof(char);
    printf("size of char length:%d, ch = %d\n",length, ch);     /* %d: 十进制.decimal*/

    /*
          0000 0000 : 0
          1111 1111 : 255
    */ 
   /*long short bool double float...*/
   /* 3.长整型*/
   /* 在32位操作系统，64位操作系统*/
    long num = 435647;
    length = sizeof(num);
    printf("size of long length:%d\n",length);

    /* 4. 浮点型（单精度）*/
    float  weight = 63.86;
    length = sizeof(weight);
    printf("size of float :%d,\tweight:%f\n",length,weight);

    /*浮点型（双精度）*/
    double height = 176.5;
    length = sizeof(height);
    printf("size of double:%d,\t height:%f\n,length,height");


    /*6.布尔类型 非0即1*/
    bool empty = true;
    length = sizeof(empty);
    printf("size of bool:%d,empty:%d\n,length,empty");

    /*7.指针类型*/ 
    char*str = "hello world";
    length = sizeof(str);
    printf("size of char * :%d\n",length);
}